#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import rospy
from turtlesim.msg import Pose

def turtle_pose_callback(msg):
    '''
[turtlesim/Pose]
float32 x
float32 y
float32 theta
float32 linear_velocity
float32 angular_velocity
    '''
    rospy.loginfo("Turtle pose: x:%.6f,y:%6f,theta:%.6f,linear_vel:%.6f,angular_vel:%.6f", 
        msg.x, msg.y, msg.theta, msg.linear_velocity, msg.angular_velocity)

def pose_subscriber():
    rospy.init_node('pose_subscriber', anonymous=True)

    rospy.Subscriber('/turtle1/pose', Pose, turtle_pose_callback)

    rospy.spin()

if __name__ == '__main__':
    pose_subscriber()